<?php

namespace app\admin\model;

use think\Model;

class User extends Model
{
    public function searchUserNameAttr($query, $value, $data)
    {
        $query->where('user_name','like', $value . '%');
    }
    
    public function searchCreatedAtAttr($query, $value, $data)
    {
        $query->whereBetweenTime('created_at', $value[0], $value[1]);
    }   
}
